package com.ruoyi.service.impl;

import com.ruoyi.mappers.DataStatisticsMapper;
import com.ruoyi.service.IDataStatisticsService;
import com.ruoyi.vo.DataGrowthVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Collections;
import java.util.List;

@Service
public class DataStatisticsServiceImpl implements IDataStatisticsService {

    @Autowired
    private DataStatisticsMapper dataStatisticsMapper;

    @Override
    public List<DataGrowthVo> getDataGrowth(String year,String month,String table) {
        return dataStatisticsMapper.getUserDataGrowth(year,month,table);
    }

    @Override
    public List<DataGrowthVo> getMonthlyProfit(String year, String month) {
        return dataStatisticsMapper.getMonthlyProfit(year,month);
    }

    @Override
    public List<DataGrowthVo> getAnnualProfit(String year) {
        return dataStatisticsMapper.getAnnualProfit(year);
    }

    @Override
    public List<DataGrowthVo> getWeeklyOrder(String startOfWeek, String endOfWeek) {
        return dataStatisticsMapper.getWeeklyOrder(startOfWeek,endOfWeek);
    }

    @Override
    public List<DataGrowthVo> getMonthlyOrder(String year, String month) {
        return dataStatisticsMapper.getMonthlyOrder(year,month);
    }

    @Override
    public List<DataGrowthVo> getAnnualOrder(String year) {
        return dataStatisticsMapper.getAnnualOrder(year);
    }
}
